package cn.edu.scau.cmi.liyunlin.simpleFactoryMethod;

import javafx.fxml.FXML;

import javafx.scene.control.Button;

import javafx.scene.control.TextArea;

import cn.edu.scau.cmi.liyunlin.simpleFactoryMethod.domain.*;

public class MeatFactory {
	@FXML
	private Button pork;
	@FXML
	private Button beef;
	@FXML
	private Button chicken;
	@FXML
	private TextArea output;

	public void porkBtn() {
		Meat pork = new Pork();
		output.setText(output.getText() + pork.toString() + "\n");
	}
	
	public void beefBtn() {
		Meat beef = new Beef();
		output.setText(output.getText() + beef.toString() + "\n");
	}
	
	public void chickenBtn() {
		Meat chicken = new Chicken();
		output.setText(output.getText() + chicken.toString() + "\n");
	}
}
